Accessing, adding items to, and deleting items from a dictionary are all simple operations, and dictionaries can be easily incorporated into compound statements like an if statement or a for loop. 访问、添加和删除dictionary中的元素都很简单,而且dictionary很容易用于复合语句,比如if语句或for循环。
In this instance, the indentation isn't mandatory, as it is with a compound statement. 在本例中,缩进不是强制性的,就跟一个复合语句一样。
A compound statement consists of a flow control instruction, followed by a colon character(:), followed by a block of program statements. 一个复合语句包括一个流控制指令,后跟一个冒号(:),然后再是一个程序语句块。
LEAVE: Used to transfer control out of a loop or a compound statement LEAVE:将控制转移到循环之外或一个复合语句
When you type in the if statement and the terminating colon, then press Return ( or Enter) on your keyboard, the Python interpreter realizes you have entered a compound statement. 当键入if语句和终止的冒号,并按键盘上的回车键时,Python解释器就知道您输入了一个复合语句。
The statement means either a simple statement terminated by a semicolon or a compound statement, which is a group of simple statements enclosed in braces. “语句”要么是用分号结尾的一个简单语句,要么是一个复合语句――封闭在括号内的一组简单语句。
The compound statement leaves out the brace; 复合语句漏掉花括号;